<%--
  Created by IntelliJ IDEA.
  User: huadongyu
  Date: 2025/9/16
  Time: 20:44
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>员工列表</title>
</head>
<body>
<h1>员工信息总览</h1>
<a href="${pageContext.request.contextPath}/addEmp.jsp">添加员工</a>
<hr>
  <table border="1">
    <tr>
      <th>员工编号</th>
      <th>员工姓名</th>
      <th>员工性别</th>
      <th>员工部门</th>
      <th>入职时间</th>
      <th>员工工资</th>
      <th>员工奖金</th>
      <th>员工住址</th>
      <th>员工职务</th>
      <th>员工领导</th>
      <th>操&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;作</th>
    </tr>
    <c:forEach items="${emps}" var="emp">
      <tr>
        <td>${emp.id}</td>
        <td>${emp.name}</td>
        <td>${emp.gender}</td>
        <td>${emp.dept_id}</td>
        <td>${emp.join_time}</td>
        <td>${emp.salary}</td>
        <td>${emp.money}</td>
        <td>${emp.address}</td>
        <td>${emp.description}</td>
        <td>${emp.m_id}</td>
        <td>
          <a href="${pageContext.request.contextPath}/findById.emp?id=${emp.id}">修改</a>
          <a href="${pageContext.request.contextPath}/delete.emp?id=${emp.id}">删除</a>
        </td>
      </tr>
    </c:forEach>
  </table>
</body>
</html>
